package com.simple.datax.db.mybatis.model;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 * 
 */
public class DataxSystemLog implements Serializable {
	private Date logTime;

	private String logThread;

	private String actionName;

	private String logLevel;

	private String logContent;

	private static final long serialVersionUID = 1L;

	public Date getLogTime() {
		return logTime;
	}

	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	public String getLogThread() {
		return logThread;
	}

	public void setLogThread(String logThread) {
		this.logThread = logThread == null ? null : logThread.trim();
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName == null ? null : actionName.trim();
	}

	public String getLogLevel() {
		return logLevel;
	}

	public void setLogLevel(String logLevel) {
		this.logLevel = logLevel == null ? null : logLevel.trim();
	}

	public String getLogContent() {
		return logContent;
	}

	public void setLogContent(String logContent) {
		this.logContent = logContent == null ? null : logContent.trim();
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		DataxSystemLog other = (DataxSystemLog) that;
		return (this.getLogTime() == null ? other.getLogTime() == null : this
				.getLogTime().equals(other.getLogTime()))
				&& (this.getLogThread() == null ? other.getLogThread() == null
						: this.getLogThread().equals(other.getLogThread()))
				&& (this.getActionName() == null ? other.getActionName() == null
						: this.getActionName().equals(other.getActionName()))
				&& (this.getLogLevel() == null ? other.getLogLevel() == null
						: this.getLogLevel().equals(other.getLogLevel()))
				&& (this.getLogContent() == null ? other.getLogContent() == null
						: this.getLogContent().equals(other.getLogContent()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((getLogTime() == null) ? 0 : getLogTime().hashCode());
		result = prime * result
				+ ((getLogThread() == null) ? 0 : getLogThread().hashCode());
		result = prime * result
				+ ((getActionName() == null) ? 0 : getActionName().hashCode());
		result = prime * result
				+ ((getLogLevel() == null) ? 0 : getLogLevel().hashCode());
		result = prime * result
				+ ((getLogContent() == null) ? 0 : getLogContent().hashCode());
		return result;
	}

	public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}